package com.hmall.search.service.Impl;

import com.hmall.common.client.ItemClient;
import com.hmall.common.dto.PageDTO;
import com.hmall.common.dto.SearchDTO;
import com.hmall.common.pojo.ItemDoc;
import com.hmall.common.pojo.SearchVo;
import com.hmall.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description SearchServiceImpl
 * @Author zhq
 * @Date 2024-11-15
 */
@Service
public class SearchServiceImpl implements SearchService {
    @Autowired
    private ItemClient itemClient;

    /**
     * 过滤聚合共功能
     * @return
     */
    @Override
    public SearchVo searchFilters() {
        return itemClient.searchFilters();
    }

    @Override
    public PageDTO<ItemDoc> searchList(SearchDTO dTO) {
//        if (ObjectUtil.isEmpty(dTO.getKey())
//            &&) {

//        }
        return itemClient.searchList(dTO);
    }
}
